/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.marcelo.comun.efectos;

import java.awt.Color;
import java.awt.Graphics;
import javax.swing.JComponent;

/**
 *
 * @author marcelo
 */
public class MyGlassPane extends JComponent {
       
       private static final Color DEFAULT_COLOR = new Color(0, 0, 0, 60);
       private Color backgroundColor;

        public MyGlassPane() {
            this(DEFAULT_COLOR);
        }
        public MyGlassPane(Color backgroundColor) {
            this.backgroundColor = backgroundColor;
        }

        @Override
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            g.setColor(backgroundColor);
            g.fillRect(0, 0, getWidth(), getHeight());
        }

}